from rest_framework import serializers

from basic_info.models import NationModel, ProvinceModel, CityModel, CountyModel


class NationSerializer(serializers.ModelSerializer):
    """
        国家的序列化
    """

    class Meta:

        model = NationModel
        fields = '__all__'

class ProvinceSerializer(serializers.ModelSerializer):
    """
        省份的序列化
    """

    class Meta:

        model = ProvinceModel
        fields = '__all__'

class CitySerializer(serializers.ModelSerializer):
    """
        地级市的序列化
    """

    class Meta:

        model = CityModel
        fields = '__all__'

class CountySerializer(serializers.ModelSerializer):
    """
        县级市的序列化
    """

    class Meta:

        model = CountyModel
        fields = '__all__'